import api from '../../api/index'
const app = getApp()

Component({
  properties:{
    items:Array
  },
  data: {
   
  },

  lifetimes: {
    attached: function() {
      // 获取items
    }
  },

  methods: {
    tapItem: function(e) {
      // 跳转到对应赛事
      var index = e.currentTarget.dataset.index
      var contest = this.data.items[index]
      wx.navigateTo({
        url: '/pages/contest/detail/detail?contest='+ JSON.stringify(contest),
      })
    }
  }
  
})
